﻿@{
     Layout = "_mainLayout.cshtml";
}

@{
    
  var db = Database.Open("EPS");
       var sqlCommand="SELECT * FROM awaitinguser";
       List<awaitingUser>lst=new List<awaitingUser>();

       foreach(var row in db.Query(sqlCommand))
       {
           awaitingUser temp= new awaitingUser();
           temp.deviceid = row.deviceid.ToString();
           temp.fname = row.fname.ToString();
           temp.lname = row.lname.ToString();
           temp.age = row.age.ToString();
           temp.city = row.city.ToString();
           temp.country = row.country.ToString();
           temp.gender = row.gender.ToString();
           temp.un = row.username.ToString();
           temp.pwd = row.password.ToString();
           
           lst.Add(temp);
           string s="";
       }

}


<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title></br></br>EPS - Awaiting Users</title>
    </head>
    <body>
        <div>
            </br></br>

            <ul>
                
                  @{
                      for(int i=0;i<lst.Count;i++)
                      {
                           
                          var s ="appuser.cshtml?did=" +lst[i].deviceid.ToString(); 
                              <li>
                                   
                               
                               <p> Device ID : <strong>@lst[i].deviceid</strong></p>
                               <p> First Name : <strong>@lst[i].fname</strong></p>
                               <p> Last Name : <span>@lst[i].lname</span><br /></p>
                               <p> Age : <span>@lst[i].age</span><br /></p>
                               <p> City : <span>@lst[i].city</span><br /></p>
                               <p> Country : <span>@lst[i].country</span><br /></p>
                               <p> Gender : <span>@lst[i].gender</span><br /></p>
                               <p> Username : <span>@lst[i].un</span><br /></p>
                               <p> Password : <span>@lst[i].pwd</span><br /><br/></p>

                                
                                Approve User : <a href="@Href("~/appuser.cshtml", @s)" style ="font-size: 15px;color: #0094ff">  Yes </a>  
                                        <a href="@Href("~/declineuser.cshtml", @s)" style ="font-size: 15px;color: #0094ff">  No </a><br/><br/>
                              
                              
                              </li>
                                
                           }
                           
                       }
               
                </ul>

        </div>
        <div>
            <a href="~/EPSHomePage.cshtml" style="color: #0094ff">Go to Home Page</a>
        </div>
    </body>
</html>
